package com.hongmeng.teamwork.enums;

public enum IsDeletedFlagEnum {

    UN_DELETED(0, "未删除"),
    DELETED(1, "已删除"),
    ;

    private int code;
    private String desc;

    IsDeletedFlagEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static IsDeletedFlagEnum ofEnum(int code) {
        for (IsDeletedFlagEnum isDeletedFlagEnum : IsDeletedFlagEnum.values()) {
            if (isDeletedFlagEnum.code == code) {
                return isDeletedFlagEnum;
            }
        }
        return null;
    }
}
